package pl.enigmatic.random;

import java.awt.Color;


public class RandomColor extends Random<Color> {

	public RandomColor() {
		alpha.setFixed(255);
	}

	private final RandomNumber<Integer> red = new RandomNumber<Integer>(0, 255);
	private final RandomNumber<Integer> green = new RandomNumber<Integer>(0, 255);
	private final RandomNumber<Integer> blue = new RandomNumber<Integer>(0, 255);
	private final RandomNumber<Integer> alpha = new RandomNumber<Integer>(0, 255);

	@Override
	public Color getRandomValue() {
		return new Color(red.get(), green.get(), blue.get(), alpha.get());
	}

	public void setRedFixed(final int fixed) {
		red.setFixed(fixed);
	}

	public void setRedRandom() {
		red.setRandom();
	}

	public void setGreenFixed(final int fixed) {
		green.setFixed(fixed);
	}

	public void setGreenRandom() {
		green.setRandom();
	}

	public void setBlueFixed(final int fixed) {
		blue.setFixed(fixed);
	}

	public void setBlueRandom() {
		blue.setRandom();
	}

	public void setAlphaFixed(final int fixed) {
		alpha.setFixed(fixed);
	}

	public void setAlphaRandom() {
		alpha.setRandom();
	}

}
